<!doctype html>
<html>
<head>
<meta charset="<?php echo $cfg_soft_lang; ?>">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>更改帐号基本资料 - 会员中心 - <?php echo $cfg_webname; ?></title>

<link href="/templets/nbbmobi/style/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="templets/style/base.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="templets/js/j.js"></script>
<script type="text/javascript" language='javascript'src='templets/js/main.js'></script>
<script type="text/javascript" src="templets/js/load.js"></script>
<script type="text/javascript" src="templets/js/leftmenu.js"></script>
<script type="text/javascript">  
  function checkSubmit()
{
	if(document.form2.oldpwd.value=='')
	{
		document.form2.oldpwd.focus();
		alert("旧密码必须填写！");
		return false;
	}
	if(document.form2.userpwdok.value!=document.form2.userpwd.value)
	{
		document.form2.userpwdok.focus();
		alert("两次密码不一致！");
		return false;
	}
	if(document.form2.email.value=="")
	{
		document.form2.email.focus();
		alert("Email不能为空！");
		return false;
	}
	if(document.form2.uname.value=="")
	{
		document.form2.uname.focus();
		alert("用户昵称不能为空！");
		return false;
	}
	if(document.form2.vdcode.value=="")
	{
		document.form2.vdcode.focus();
		alert("验证码不能为空！");
		return false;
	}
}
</script>
</head>
<body>
 <?php include(DEDEMEMBER."/templets/head.htm"); ?>
<div class="container-xl">
  <div  class="row">
    <div class="col-12 bg-white">
      <div class="my-3">
		<a class="btn btn-primary btn-sm" href="edit_baseinfo.php">基本资料</a>
		<a class="btn btn-primary btn-sm" href="edit_fullinfo.php">详细资料</a>
        <a class="btn btn-primary btn-sm" href="edit_face.php">头像设置</a>
      </div>
     <form action="edit_baseinfo.php" method="post" enctype="multipart/form-data" name="form2" onsubmit="return checkSubmit();">
     <input type="hidden" name="dopost" value="save" />
      <div>
        <h3 class="meTitle pb-3"><strong>基本资料</strong></h3>
        <div class="postForm">
          <p class="cellBg">
            <label>帐号类型：</label>
            <?php echo $row['mtype']; ?></p>
          <p>
            <label>用户名：</label>
            <?php echo $cfg_ml->M_LoginID; ?>
          </p>
		  
			<div class="input-group mb-3">
			  <div class="input-group-prepend">
				<span class="input-group-text" id="basic-addon1">昵称/公司名称</span>
			  </div>
			  <input name="uname" id="uname" value="<?php echo $row['uname']; ?>" type="text" class="form-control" placeholder="Username" aria-label="Username" aria-describedby="basic-addon1">
			  <small id="_uname" class="form-text text-muted">(个人会员该项为昵称，企业会员填写公司名称)</small>
			</div>
			<div class="input-group mb-3">
			  <div class="input-group-prepend">
				<span class="input-group-text" id="basic-addon1">原登陆密码</span>
			  </div>
			  <input name="oldpwd" type="password" id="oldpwd" type="text" class="form-control" placeholder="原密码" aria-label="Username" aria-describedby="basic-addon1">
			  <small class="form-text text-muted">*</small>
			</div>
			<div class="input-group mb-3">
			  <div class="input-group-prepend">
				<span class="input-group-text" id="basic-addon1">新密码</span>
			  </div>
			  <input name="userpwd" type="password" id="userpwd" class="form-control" placeholder="新密码(不修改密码留空)" aria-label="Username" aria-describedby="_userpwdok">
			</div>
			<div class="input-group mb-3">
			  <div class="input-group-prepend">
				<span class="input-group-text" id="basic-addon1">确认密码</span>
			  </div>
			  <input name="userpwdok" type="password" id="userpwdok" value="" class="form-control" placeholder="确认密码(不修改密码留空)" aria-label="Username" aria-describedby="basic-addon1">
			</div>
			<div class="input-group mb-3">
			  <div class="input-group-prepend">
				<span class="input-group-text" id="basic-addon1">确认密码</span>
			  </div>
			  <input name="userpwdok" type="password" id="userpwdok" value="" class="form-control" placeholder="确认密码(不修改密码留空)" aria-label="Username" aria-describedby="basic-addon1">
			</div>
		  
          
          <p class="cellBg">
            <label>原安全问题：</label>
            <?php
      			require(DEDEDATA.'/safequestions.php');
      			echo GetSafequestion($row['safequestion'],'safequestion');
     		 ?>
                <span id="_safequestion">(忘记密码时重设密码用)</span>
          </p>
		  
		  <div class="input-group mb-3">
			  <div class="input-group-prepend">
				<span class="input-group-text" id="basic-addon1">原问题答案</span>
			  </div>
			  <input name="safeanswer" type="text" id="safeanswer" value="" class="form-control" placeholder="原问题答案" aria-label="原问题答案" aria-describedby="basic-addon1">
			</div>
          

          <p class="cellBg">
            <label>新安全问题：</label>
            <?php
      			echo GetSafequestion(0,'newsafequestion');
      		?>
               <span id="_safequestionnew">(不修改不用填写)</span> 
          </p>
		  <div class="input-group mb-3">
			  <div class="input-group-prepend">
				<span class="input-group-text" id="basic-addon1">新问题答案</span>
			  </div>
			  <input name="newsafeanswer" type="text" id="newsafeanswer" class="form-control" placeholder="新问题答案" aria-label="新问题答案" aria-describedby="basic-addon1">
			</div>
          <div class="input-group mb-3">
			  <div class="input-group-prepend">
				<span class="input-group-text" id="basic-addon1">电子邮箱</span>
			  </div>
			  <input name="email" type="text" id="email" value="<?php echo $row['email']; ?>" class="form-control" placeholder="email" aria-label="Username" aria-describedby="basic-addon1">
			</div>
         
          <p>
            <label>性别：</label>
			<input type="radio" name="sex" value="男" <?php if($row['sex']=='男') echo " checked='checked' "; ?>/>
             男 &nbsp;
            <input type="radio" name="sex" value="女" <?php if($row['sex']=='女') echo " checked='checked' "; ?>/>
             女 &nbsp;
            <input type="radio" name="sex" value="保密'" <?php if($row['sex']=='保密') echo " checked='checked' "; ?>/>
             保密 
          </p>
		  <div class="input-group mb-3">
			  <div class="input-group-prepend">
				<span class="input-group-text">验证码</span>
			  </div>
			  <input name="vdcode" id="vdcode" type="text" class="form-control" aria-label="Amount (to the nearest dollar)">
			  <div class="input-group-append">
				<span class="input-group-text"><img src="../include/vdimgck.php" align="absmiddle" alt="看不清？点击更换" style="cursor:pointer" onclick="this.src=this.src+'?'" /></span>
			  </div>
			</div>
         
          <p>
            <button class="button2" type="submit">更新</button>
            <button class="button2 ml10" type="reset">重设</button>
          </p>
    </div>
      </div>
      </form>
      <!--主操作区域 -->
    </div>
  </div>
  </div>
<?php include(DEDEMEMBER."/templets/foot.htm"); ?>

</body>
</html>